<template>
          <iframe :src="url" frameborder="0" width="100%" height="100%"></iframe>
</template>

<script>
export default {
       data(){
           return{
               token:"",
               url:"",
           }
       },
       mounted(){
           this.token = localStorage.getItem('Token')
           console.log(this.token)
           var qs = require('qs')
           this.$http.post('/api/meta/yysarg',qs.stringify({'token':this.token}))
               .then(res=>{
                   console.log(res.data.iframeurl)
                   if(res.data.code=="200"){
                      this.url = res.data.iframeurl
                   }
               })
        let timer = setInterval(()=>{
               this.$http.post('/api/meta/yysState',qs.stringify({'token':this.token}))
                .then(res=>{
                    console.log(res)
                    if(res.data.code=="200"){
                       clearInterval(timer);
                        this.$router.go(-1);
                 }
             })
             },1500);     
       }
}
</script>

<style>

</style>
